package com.idanchuang.count.service;

import com.idanchuang.user.count.service.api.request.command.read.AddSysMsgCommand;
import com.idanchuang.user.count.service.api.request.command.read.AddUserMsgCommand;
import com.idanchuang.user.count.service.api.request.command.read.BatchAddUserMsgCommand;
import com.idanchuang.user.count.service.api.request.command.read.RemoveSysMsgCommand;
import com.idanchuang.user.count.service.api.request.command.read.RemoveUserMsgCommand;
import com.idanchuang.user.count.service.api.request.command.read.UserMsgAllReadCommand;
import com.idanchuang.user.count.service.api.request.query.read.BatchUserUnreadMsgCountQuery;
import com.idanchuang.user.count.service.api.request.query.read.UserMsgIfReadBatchQuery;
import com.idanchuang.user.count.service.api.request.query.read.UserUnreadMsgCountQuery;
import com.idanchuang.user.count.service.api.response.BatchUserSceneCountDTO;
import com.idanchuang.user.count.service.api.response.UserSceneCountDTO;

import java.util.List;

/**
 * @author Richard_yyf
 * @version 1.0 2021/7/7
 */
public interface MsgUnreadCountService {

    /**
     * 将某一场景消息设置为全部已读
     * @param readCommand 请求内容
     */
    void readAll(UserMsgAllReadCommand readCommand);

    /**
     * 将某一场景消息设置为全部已读 (异步批量)
     * @param readCommands 请求内容
     */
    void readAllInAsyncBatch(List<UserMsgAllReadCommand> readCommands);

    /**
     * 添加用户未读消息
     * @param addUserMsgCommand 请求内容
     */
    void addUserMsg(AddUserMsgCommand addUserMsgCommand);

    /**
     * 添加用户未读消息 (异步批量)
     * @param addUserMsgCommands 请求内容
     */
    void addUserMsgInAsyncBatch(List<AddUserMsgCommand> addUserMsgCommands);

    /**
     * 一条消息 多用户 批量添加
     * @param batchAddUserMsgCommand batch command
     */
    void batchAddUserMsg(BatchAddUserMsgCommand batchAddUserMsgCommand);

    /**
     * 一条消息 多用户 批量添加  (异步批量)
     * @param batchAddUserMsgCommands batch command list
     */
    void batchAddUserMsgInAsyncBatch(List<BatchAddUserMsgCommand> batchAddUserMsgCommands);

    /**
     * 添加系统未读消息
     * @param addSysMsgCommand 请求内容
     */
    void addSysMsg(AddSysMsgCommand addSysMsgCommand);

    /**
     * 删除系统未读消息
     * @param removeSysMsgCommand 请求内容
     */
    void removeSysMsg(RemoveSysMsgCommand removeSysMsgCommand);

    /**
     * 删除用户维度的未读消息
     * @param removeUserMsgCommand 请求内容
     */
    void removeUserMsg(RemoveUserMsgCommand removeUserMsgCommand);

    /**
     * 统计用户该场景下未读数
     * @param unreadMsgCountQuery 请求内容
     * @return 未读数统计
     */
    UserSceneCountDTO queryUnreadMsgCount(UserUnreadMsgCountQuery unreadMsgCountQuery);

    /**
     * 批量场景 统计用户该场景下未读数
     * @param batchUserUnreadMsgCountQuery 请求内容
     * @return 批量场景 未读数统计
     */
    BatchUserSceneCountDTO batchQueryUnreadMsgCount(BatchUserUnreadMsgCountQuery batchUserUnreadMsgCountQuery);

    /**
     * 批量查询指定消息集合对用户是否已读
     * @param userMsgIfReadBatchQuery 请求内容
     * @return 未读消息 list
     */
    List<String> batchQueryUserMsgIfRead(UserMsgIfReadBatchQuery userMsgIfReadBatchQuery);
}
